package com.zjitc.dao;

import com.zjitc.model.Emp;
import com.zjitc.model.User;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/3/28 15:52
 * @description:
 */
public interface UserDao {

  int userNameCount(@Param("username") String username);

  User checkByUsernameAndPassword(@Param("username") String username,
      @Param("password") String password);

  int userRegister(User user);

  boolean findUserName(@Param("username") String username);

  boolean findUserEmail(@Param("email") String email);

  User findByUsername(@Param("username") String username);

  void updatePassword(@Param("password") String passwordNew, @Param("username") String username);


  void updateUser(@Param("email") String email, @Param("phone") String phone,
      @Param("question") String question, @Param("answer") String answer,
      @Param("username") String username);
  void addEmps(@Param("emps")List<Emp> emps);

  List<User> findAllUser();
}
